home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-04 / gs24src.zip / TBCPLUS.MAK < prev    next >
Text File  |  1992-03-25  |  8KB  |  252 lines

  1. #    Copyright (C) 1989, 1990, 1991 Aladdin Enterprises.  All rights reserved.
  2. #    Distributed by Free Software Foundation, Inc.
  3. #
  4. # This file is part of Ghostscript.
  5. #
  6. # Ghostscript is distributed in the hope that it will be useful, but
  7. # WITHOUT ANY WARRANTY.  No author or distributor accepts responsibility
  8. # to anyone for the consequences of using it or for whether it serves any
  9. # particular purpose or works at all, unless he says so in writing.  Refer
  10. # to the Ghostscript General Public License for full details.
  11. #
  12. # Everyone is granted permission to copy, modify and redistribute
  13. # Ghostscript, but only under the conditions described in the Ghostscript
  14. # General Public License.  A copy of this license is supposed to have been
  15. # given to you along with Ghostscript so you can know your rights and
  16. # responsibilities.  It should be in a file named COPYING.  Among other
  17. # things, the copyright notice and this notice must be preserved on all
  18. # copies.
  19.  
  20. # makefile for Ghostscript, MS-DOS/Borland C++ platform.
  21.  
  22. # ------------------------------- Options ------------------------------- #
  23.  
  24. ###### This section is the only part of the file you should need to edit.
  25.  
  26. # ------ Generic options ------ #
  27.  
  28. # Define the default directory/ies for the runtime
  29. # initialization and font files.  Separate multiple directories with \;.
  30. # Use / to indicate directories, not a single \.
  31.  
  32. GS_LIB_DEFAULT=c:/gs\;c:/gs/fonts
  33.  
  34. # Define the name of the Ghostscript initialization file.
  35. # (There is no reason to change this.)
  36.  
  37. GS_INIT=gs_init.ps
  38.  
  39. # Choose generic configuration options.
  40.  
  41. # Setting DEBUG=1 includes debugging features (-Z switch) in the code.
  42. # Code runs substantially slower even if no debugging switches are set,
  43. # and also takes about another 25K of memory.
  44.  
  45. DEBUG=0
  46.  
  47. # Setting TDEBUG=1 includes symbol table information for the Borland debugger.
  48. # No execution time or space penalty, just larger .OBJ and .EXE files
  49. # and slower linking.
  50.  
  51. TDEBUG=0
  52.  
  53. # Setting NOPRIVATE=1 makes private (static) procedures and variables public,
  54. # so they are visible to the debugger and profiler.
  55. # No execution time or space penalty, just larger .OBJ and .EXE files.
  56.  
  57. NOPRIVATE=0
  58.  
  59. # ------ Platform-specific options ------ #
  60.  
  61. # If you don't have an assembler, set USE_ASM=0.  Otherwise, set USE_ASM=1,
  62. # and set ASM to the name of the assembler you are using.  This can be
  63. # a full path name if you want.  Normally it will be masm or tasm.
  64.  
  65. USE_ASM=1
  66. ASM=tasm
  67.  
  68. # Define the drive, directory, and compiler name for the Turbo C files.
  69. # COMP is the compiler name (tcc for Turbo C++, bcc for Borland C++).
  70. # COMPDIR contains the compiler and linker (normally \bc\bin).
  71. # BGIDIR contains the BGI files (normally \bc\bgi).
  72. # INCDIR contains the include files (normally \bc\include).
  73. # LIBDIR contains the library files (normally \bc\lib).
  74. # Note that these prefixes are always followed by a \,
  75. #   so if you want to use the current directory, use an explicit '.'.
  76.  
  77. COMP=bcc
  78. COMPDIR=c:\bc\bin
  79. # For BGIDIR, use / to indicate directories, not \.
  80. BGIDIR=c:/bc/bgi
  81. INCDIR=c:\bc\include
  82. LIBDIR=c:\bc\lib
  83.  
  84. # Define whether you want to use the Borland code overlay mechanism
  85. # (VROOMM).  Code overlays make it possible to process larger files,
  86. # but code swapping will slow Ghostscript down even on smaller ones.
  87. # See the file overlay.h to control details of overlaying such as
  88. # the overlay buffer size, whether to use EMS and/or extended memory
  89. # to store evicted overlays, and how much of that memory to use.
  90.  
  91. OVERLAY=1
  92.  
  93. # Choose platform-specific options.
  94.  
  95. # Define the processor (CPU) type.  Options are 86, 186, 286, 386, or 486.
  96. # (The 8086 and 8088 both correspond to processor type 86.)
  97. # 286 and up do not use protected mode.  Higher numbers produce
  98. # code that may be significantly smaller and faster, but the executable
  99. # will bail out with an error message on lower-numbered processor types.
  100.  
  101. CPU_TYPE=86
  102.  
  103. # Define the math coprocessor (FPU) type.  Options are 0, 87, 287, or 387.
  104. # If the CPU type is 486, the FPU type is irrelevant, since the 80486
  105. # CPU includes the equivalent of an 80387 on-chip.
  106. # A non-zero option means that the executable will only run if a FPU
  107. # of that type (or higher) is available: this is NOT currently checked
  108. # at runtime.
  109. #   Code is significantly faster.
  110.  
  111. FPU_TYPE=0
  112.  
  113. # ---------------------------- End of options ---------------------------- #
  114.  
  115. # Swapping `make' out of memory makes linking much faster.
  116.  
  117. .swap
  118.  
  119. # Define the name of the makefile -- used in dependencies.
  120.  
  121. MAKEFILE=tbcplus.mak
  122.  
  123. # Define the ANSI-to-K&R dependency.  Turbo C accepts ANSI syntax,
  124. # but we need to preconstruct ccf.tr to get around the limit on
  125. # the maximum length of a command line.
  126.  
  127. AK=ccf.tr
  128.  
  129. # Define the compilation flags for an 80286.
  130.  
  131. F286=-2
  132.  
  133. !include "tccommon.mak"
  134.  
  135. # Define the compilation flags.
  136.  
  137. !if $(NOPRIVATE)
  138. CP=-DNOPRIVATE
  139. !else
  140. CP=
  141. !endif
  142.  
  143. !if $(DEBUG)
  144. CD=-DDEBUG
  145. !else
  146. CD=
  147. !endif
  148.  
  149. !if $(TDEBUG)
  150. CT=-v
  151. LCT=/v
  152. !else
  153. CT=-y
  154. LCT=/m /l
  155. !endif
  156.  
  157. GENOPT=$(CP) $(CD) $(CT)
  158.  
  159. !if $(OVERLAY)
  160. CY=-Y
  161. CYO=-Yo -zAOVLY
  162. LO=/oOVLY
  163. LIBOVL=$(LIBDIR)\overlay
  164. OVLH=overlay.h
  165. !else
  166. CY=
  167. CYO=
  168. LO=
  169. LIBOVL=
  170. OVLH=
  171. !endif
  172.  
  173. CCFLAGS=$(GENOPT) $(PLATOPT) $(FPFLAGS) -m$(MM)
  174. CC=$(COMPDIR)\$(COMP) @ccf.tr
  175. CCC=$(CC) $(CYO) -O -c
  176. CC0=$(CC) $(CYO) -c
  177. CCINT=$(CC) $(CYO) -c
  178.  
  179. .c.obj:
  180.     $(CCC) { $<}
  181.  
  182. # ------ Devices and features ------ #
  183.  
  184. # Choose the language feature(s) to include.  See gs.mak for details.
  185. # Since code overlays are available, we include all the supported
  186. # optional features.
  187.  
  188. FEATURE_DEVS=filter.dev dps.dev level2.dev
  189.  
  190. # Choose the device(s) to include.  See devs.mak for details.
  191.  
  192. DEVICE_DEVS=vga.dev ega.dev vesa.dev epson.dev bj10e.dev deskjet.dev laserjet.dev paintjet.dev
  193. !include "gs.mak"
  194. !include "devs.mak"
  195.  
  196. # Build the compiler response file depending on the selected options.
  197.  
  198. ccf.tr: $(MAKEFILE) makefile
  199.     echo -a -d -r -G -N -X -I$(INCDIR) $(CCFLAGS) >ccf.tr
  200.  
  201. # -------------------------------- Library -------------------------------- #
  202.  
  203. # We have to compile gp_itbc without -1, because it includes a run-time
  204. # check to make sure we are running on the right kind of processor.
  205. gp_itbc.$(OBJ): gp_itbc.c $(string__h) $(gx_h) $(gp_h) \
  206.  $(OVLH) $(MAKEFILE) makefile
  207.     $(CC) $(CCFLAGS) -1- $(CY) -DCPU_TYPE=$(CPU_TYPE) -c gp_itbc.c
  208.  
  209. gp_dosfb.$(OBJ): gp_dosfb.c $(memory__h) $(gx_h) $(gp_h) $(gserrors_h) $(gxdevice_h)
  210.  
  211. gp_msdos.$(OBJ): gp_msdos.c $(dos__h) $(string__h) $(gx_h) $(gp_h)
  212.  
  213. # ----------------------------- Main program ------------------------------ #
  214.  
  215. iutilasm.$(OBJ): iutilasm.asm
  216.  
  217. # A rule to do a quick and dirty compilation attempt when first installing
  218. # Ghostscript.  Many of the compilations will fail: follow this with 'make'.
  219.  
  220. begin:
  221.     erase ccf.tr
  222.     erase arch.h
  223.     erase genarch.exe
  224.     make arch.h
  225.     - $(CCC) *.c
  226.     erase gp_*.obj
  227.     erase gdevepsn.obj
  228.  
  229. # Get around the fact that the DOS shell has a rather small limit on
  230. # the length of a command line.  (sigh)
  231.  
  232. LIBCTR=libc$(MM).tr
  233.  
  234. $(LIBCTR): $(MAKEFILE) makefile
  235.     echo $(LIBOVL) $(LIBDIR)\$(FPLIB) $(LIBDIR)\math$(MM) $(LIBDIR)\c$(MM) >$(LIBCTR)
  236.  
  237. # Tracing package
  238.  
  239. # trace.c must be compiled without the -a switch!
  240. trace.obj: trace.c
  241.     $(CC) $(CCFLAGS) $(CYO) -a- -O -c trace.c
  242.  
  243. LIBDOS=$(LIB) obj.tr
  244.  
  245. # Interpreter main program
  246.  
  247. GS_ALL=gs.$(OBJ) $(INT) $(INTASM) gsmain.$(OBJ) trace.$(OBJ)\
  248.   $(LIBDOS) $(LIBCTR) obj.tr lib.tr
  249.  
  250. gs.exe: $(GS_ALL)
  251.     tlink $(LCT) $(LO) $(LIBDIR)\c0$(MM) @obj.tr $(INTASM) @gs.tr ,gs,gs,@lib.tr @$(LIBCTR)
  252.